import 'dart:convert';

EvaluationSkillPointsResult evaluationSkillPointsResultFromJson(String str) =>
    EvaluationSkillPointsResult.fromJson(json.decode(str));
String evaluationSkillPointsResultToJson(EvaluationSkillPointsResult data) =>
    json.encode(data.toJson());

class EvaluationSkillPointsResult {
  EvaluationSkillPointsResult({
    this.status,
    this.message,
    this.result,
  });

  int? status;
  String? message;
  SkillPointsDataTreeResult? result;

  factory EvaluationSkillPointsResult.fromJson(Map<String, dynamic> json) =>
      EvaluationSkillPointsResult(
        status: json["status"],
        message: json["message"],
        result: SkillPointsDataTreeResult.fromJson(json["result"]),
      );

  Map<String, dynamic> toJson() => {
        "status": status,
        "message": message,
        "result": result?.toJson(),
      };
}

class SkillPointsDataTreeResult {
  SkillPointsDataTreeResult({
    this.tree,
  });

  List<SkillPointsDataTree>? tree;

  factory SkillPointsDataTreeResult.fromJson(Map<String, dynamic> json) =>
      SkillPointsDataTreeResult(
        tree: List<SkillPointsDataTree>.from(
            json["tree"].map((x) => SkillPointsDataTree.fromJson(x))),
      );

  Map<String, dynamic> toJson() => {
        "tree": List<dynamic>.from(tree!.map((x) => x.toJson())),
      };
}

class SkillPointsDataTree {
  SkillPointsDataTree({
    this.skills,
    this.total,
    this.correct,
    this.name,
    this.id,
    this.parentId,
    this.weight,
    this.type,
  });

  List<SkillPointsDataTree>? skills;
  int? total;
  int? correct;
  String? name;
  String? id;
  String? parentId;
  int? weight;
  String? type;

  factory SkillPointsDataTree.fromJson(Map<String, dynamic> json) =>
      SkillPointsDataTree(
        skills: List<SkillPointsDataTree>.from(
            json["skills"].map((x) => SkillPointsDataTree.fromJson(x))),
        total: json["total"],
        correct: json["correct"],
        name: json["name"],
        type: json["type"],
        id: json["id"],
        parentId: json["parentId"],
        weight: json['weight'],
      );

  Map<String, dynamic> toJson() => {
        "skills": List<dynamic>.from(skills!.map((x) => x.toJson())),
        "total": total,
        "correct": correct,
        "name": name,
        "type": type,
        "id": id,
        "parentId": parentId,
        "weight": weight,
      };
}
